package com.company.design.create.factory.normal;

/**
 * @author yingfing
 * @create 2020--09--26 11:33
 * @describe - 普通模式
 */
public class SendFactory {
    public Sender produce(String type) {
        if ("mail".equalsIgnoreCase(type)) {
            return new MailSender();
        } else if ("sms".equalsIgnoreCase(type)) {
            return new SmsSender();
        } else {
            System.out.println("请输入正确的类型 ! ");
            return null;
        }
    }
}
